package com.cmsky.open.food.dao;

import java.util.*;

import com.cmsky.open.core.base.*;
import com.cmsky.open.core.util.*;

import cn.org.rapid_framework.util.*;
import cn.org.rapid_framework.web.util.*;
import cn.org.rapid_framework.page.*;
import cn.org.rapid_framework.page.impl.*;

import com.cmsky.open.food.model.*;
import com.cmsky.open.food.dao.*;
import com.cmsky.open.food.manager.*;
import com.cmsky.open.food.vo.query.*;

/**
 * @author jandyfish email:jandyfish(a)gmail.com
 * @version 1.0
 * @since 1.0
 */


import org.springframework.stereotype.Repository;


@Repository
public class FoodInfoDao extends BaseIbatis3Dao<FoodInfo,java.lang.Integer>{
	
	@Override
	public String getIbatisMapperNamesapce() {
		return "FoodInfo";
	}
	
	public BasePager findPage(FoodInfoQuery query) {
		return pageQuery("FoodInfo.findPage",query);
	}
	
	public BasePager findByKey(FoodInfoQuery query) {
		return pageQuery("FoodInfo.findByAreaId",query);
	}
	
	public Integer countByKey(FoodInfoQuery query) {
		return ((Long) this.getSqlSessionTemplate().selectOne("FoodInfo.findByAreaId.count",query)).intValue();
	}
	
	public int updatePic(FoodInfoQuery query){
		return this.getSqlSessionTemplate().update("FoodInfo.updatePic", query);
	}
}
